import {t, api, message, bs} from "@/service/index.js"


export default {
    url: {
        toLocal: "/upload/toLocal",
        uploadStrategy: "/upload/uploadStrategy",

        uploadLocalBatch: "/upload/uploadLocalBatch",
        uploadStrategyBatch: "/upload/uploadStrategyBatch",

        chunk: "/upload/chunk",
        exists: "/upload/exists",
        merge: "/upload/merge",
    },
    // data = {BigFile: , ...}
    toLocal(data) {
        return api.upload(this.url.toLocal, data)
    },
    // data = {BigFile: , ...}
    uploadStrategy(data) {
        return api.upload(this.url.uploadStrategy, data)
    },

    // data = {files: , ...}
    uploadLocalBatch(data) {
        return api.upload(this.url.uploadLocalBatch, data)
    },
    // data = {files: , ...}
    uploadStrategyBatch(data) {
        return api.upload(this.url.uploadStrategyBatch, data)
    },

    exists(data){
        return api.post(this.url.exists, data)
    },
    chunk(data){
        return api.upload(this.url.chunk, data)
    },
    merge(data){
        return api.post(this.url.merge, data)
    },
}